#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <climits>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>
#define int long long
#define x first 
#define y second 
using namespace std;
const int N = 1e5 + 10;
int a[N];
void solve()
{
    int s,n,k;
    cin >> s >> n >> k;
    if(k >= n) 
    {
        cout << "NO" << endl;
        return;
    }
    int p = s - k;
    if(p < 0 || p % (n - k) != 0)
    {
        cout << "NO" << endl;
        return;
    }
    int d = p / (n - k);
    vector<int> res;
    for(int i = 0; i < k; i++)
    {
        if(i == k - 1)   res.push_back(0);
        else res.push_back(1);
    }
    for(int i = 0; i < n - k; i++)
    {
        res.push_back(d);
    }
    string str = "YES\n";
    for(int num : res)
    {
        str += to_string(num) + " ";
    }
    if(!str.empty() && str.back() == ' ')
    {
        str.pop_back();
    }
    cout << str << endl;
}
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);
    /*int t = 1; */
     int t;
     cin >> t;
    while(t -- ) solve();
    return 0;
}